const fieldTypes = {
  Array: 'Array',
  Date: 'Date',
  IP: 'IP',
  Num: 'Num',
  String: 'String',
};

const queryNames = {
  IS: 'IS',
  LIKE: 'LIKE',
  IN: 'IN',
  RANGE: 'RANGE',
};

const queryTypes = [
  {
    id: 1,
    name: queryNames.IS,
    value: 'term',
    fieldTypes: [
      fieldTypes.Array,
      fieldTypes.Date,
      fieldTypes.IP,
      fieldTypes.Num,
      fieldTypes.String,
    ],
  },
  {
    id: 2,
    name: queryNames.LIKE,
    value: '"match_phrase',
    fieldTypes: [
      fieldTypes.Array,
      fieldTypes.Date,
      fieldTypes.IP,
      fieldTypes.Num,
      fieldTypes.String,
    ],
  },
  {
    id: 3,
    name: queryNames.IN,
    value: 'terms',
    fieldTypes: [
      fieldTypes.Array,
      fieldTypes.Date,
      fieldTypes.IP,
      fieldTypes.Num,
      fieldTypes.String,
    ],
  },
  {
    id: 4,
    name: queryNames.RANGE,
    value: 'range',
    fieldTypes: [
      fieldTypes.Array,
      fieldTypes.Date,
      fieldTypes.IP,
      fieldTypes.Num,
      fieldTypes.String,
    ],
  },
];

const boolTypes = [
  { id: 1, name: 'Must', value: 'must' },
  { id: 2, name: 'Must_Not', value: 'must_not' },
  { id: 3, name: 'Should', value: 'should' },
];

export { fieldTypes, queryTypes, queryNames, boolTypes };
